{% extends "base.html" %}
{# Copyright The IETF Trust 2016, All Rights Reserved #}
{% load origin django_bootstrap5 static %}
{% block pagehead %}
    {{ form.media.css }}
    <link rel="stylesheet" href="{% static 'ietf/css/datepicker.css' %}">
{% endblock %}
{% block title %}Request review of {{ doc.name }}{% endblock %}
{% block content %}
    {% origin %}
    <h1>
        Request review
        <br>
        <small class="text-body-secondary">{{ doc.name }}</small>
    </h1>
    <p class="my-3">
        Submit a request to have the document reviewed.
    </p>
    <div class="row mb-3">
        <div class="col-md-2 fw-bold">Current document revision</div>
        <div class="col-md-10">{{ doc.rev }}</div>
    </div>
    {% if lc_ends %}
        <div class="row mb-3">
            <div class="col-md-2 fw-bold">Last Call ends</div>
            <div class="col-md-10">{{ lc_ends|date:"Y-m-d" }} (in {{ lc_ends_days }} day{{ lc_ends_days|pluralize }})</div>
        </div>
    {% endif %}
    {% if scheduled_for_telechat %}
        <div class="row mb-3">
            <div class="col-md-2 fw-bold">Scheduled for telechat</div>
            <div class="col-md-10">
                {{ scheduled_for_telechat|date:"Y-m-d" }} (in {{ scheduled_for_telechat_days }} day{{ scheduled_for_telechat_days|pluralize }})
            </div>
        </div>
    {% endif %}
    <form class="form-horizontal" method="post">
        {% csrf_token %}
        {% bootstrap_field form.requested_by layout="horizontal" %}
        {% bootstrap_field form.type layout="horizontal" %}
        {% bootstrap_field form.team layout="horizontal" %}
        {% bootstrap_field form.deadline layout="horizontal" %}
        {% bootstrap_field form.requested_rev layout="horizontal" %}
        {% bootstrap_field form.comment layout="horizontal" %}
        <button type="submit" class="btn btn-primary">Request review</button>
        <a class="btn btn-secondary float-end"
           href="{% url "ietf.doc.views_doc.document_main" name=doc.name %}">
            Back
        </a>
    </form>
{% endblock %}
{% block js %}
    <script src="{% static 'ietf/js/datepicker.js' %}"></script>
    {{ form.media.js }}
{% endblock %}